
import 'package:fluro/fluro.dart';
import './router_handler.dart';
class Routes {
  static String root = "/";
  static String home = "/home";
  static String widgetDemo = '/widget-demo';
  static String codeView = '/code-view';
  static String githubCodeView = '/github-code-view';
  static String webViewPage = '/web-view-page';
  static String loginPage = '/loginpage';
  static String issuesMessage='/issuesMessage';
  static String collectionPage = '/collection-page';
  static String collectionFullPage = '/collection-full-page';
  static String standardPage = '/standard-page/:id';
  static String partsItemPage = '/parts-item-page/:id/:readonly';
  static String lendingItemPage = '/lending-item-page/:id/:readonly';
  static String lendNowPage = '/lendnow/:id';
  static String mrOrderPage = '/mr-order-page/:id/:readonly';
  static String placeOrder = '/placeorder';
  static String checkSplit = '/manufacture/check_split';
  static String ordersOverview = '/factory/orders_overview';
  static String bizList = '/factory/biz_list/:tab';
  static String scanner = '/scanner';
  static String assetPage = "/asset_page";
  static String connectNow = "/connect_now";
  static String factoryGainOrderCapability = "/factory/gain_order_capability";
  static String roleFactoryOwner = "/role/factory_owner";
  static String iiotPortal = "/iiot/portal";
  static String tipCard = "/tipcard";
  static String demoChangeRole = "/demo_change_role";



  static void configureRoutes(Router router) {
//    router.notFoundHandler = new Handler(
//      handlerFunc: (BuildContext context, Map<String, List<String>> params) {
//      }
//    );
    router.define(home, handler: homeHandler);
//    router.define('/category/error/404', handler: widgetNotFoundHandler);
    router.define(loginPage, handler: loginPageHandler);
    router.define(partsItemPage,handler:partsItemPageHandler);
    router.define(lendingItemPage,handler:lendingItemPageHandler);
    router.define(lendNowPage,handler:lendNowPageHandler);
    router.define(mrOrderPage,handler:mrOrderPageHandler);
    router.define(placeOrder,handler:placeOrderHandler);
    router.define(checkSplit,handler:checkSplitHandler);
    router.define(ordersOverview,handler:ordersOverviewHandler);
    router.define(bizList,handler:bizListHandler);
    router.define(scanner,handler:scannerHandler);
    router.define(assetPage,handler:assetPageHandler);
    router.define(connectNow,handler:connectNowHandler);
    router.define(factoryGainOrderCapability,handler:factoryGainOrderCapabilityHandler);
    router.define(roleFactoryOwner, handler:roleFactoryOwnerHandler);
    router.define(iiotPortal, handler:iiotPortalHandler);
    router.define(tipCard, handler:tipCardHandler);
    router.define(demoChangeRole, handler:demoChangeRoleHandler);
//    widgetDemosList.forEach((demo) {
//      Handler handler = new Handler(
//          handlerFunc: (BuildContext context, Map<String, List<String>> params) {
//            print('组件路由params=$params widgetsItem=${demo.routerName}');
//            analytics.logEvent(
//                name: 'component', parameters: {'name': demo.routerName });
//            return demo.buildRouter(context);
//          });
//      String path = demo.routerName;
//      router.define('${path.toLowerCase()}', handler: handler);
//    });
//    router.define(webViewPage,handler:webViewPageHand);
//    standardPages.forEach((String id, String md) => {
//
//    });
  }
}
